<?php

require_once 'PipesImpl/Route.php';

class Pipes_Route_Simple implements PipesImpl_Route
{
	private $_data = array();

	public function __construct($controller, $action, $extras = array(), $page_type = null) 
	{
		$this->_data['controller'] = $controller;
		$this->_data['action'] = $action;
		$this->_data['extras'] = $extras;
		if (!is_null($page_type)) {
			$this->_data['page_type'] = $page_type;
		}
	}

	public function __get($key) {
		$return = null;
		switch ($key) {
			case 'controller' :
			case 'action' :
			case 'extras' :
			case 'page_type' :
				$return = $this->_data[$key];
		}

		return $return;
	}

	public function __isset($key) {
		return isset($this->_data[$key]);
	}
}
